home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / console / svgatext.3 / svgatext / SVGATextMode-1.3 / doc / setVGAreg.doc < prev    next >
Encoding:
Text File  |  1995-06-19  |  3.4 KB  |  88 lines

  1.                  get/set VGAreg, a simple VGA register hacking program
  2.                  =====================================================
  3.  
  4. This little tool is really included here for those who cannot resist to hack
  5. around with their VGA cards, without really having to know how to access
  6. them from Linux. 
  7.  
  8. It should be considered even MORE dangerous than SVGATextMode ;-) If that is
  9. possible...
  10.  
  11. It is FAR from complete, and should get a complete re-write. But it helped
  12. me to test some stuff I needed for SVGATextMode. Anyone tempted to do better
  13. is hereby invited to do so.
  14.  
  15. The syntax is quite easy: 
  16.  
  17.  
  18. ./setVGAreg: version 0.6.4. (c) 1995 Koen Gadeyne (kmg@barco.be)
  19.  Usage: ./setVGAreg [options] VGA_register_set [register_index] data
  20.      
  21.      Options: -h  print usage information
  22.               -n  Don't program VGA hardware
  23.               -d  print debugging information
  24.               -u  unlock chipset-specific registers (needs /etc/TextConfig file)
  25.               -p  produce 'pipeable' decimal output (i.e. just the result, no text)
  26.               -x  produce 'pipeable' hex output (i.e. just the result, no text)
  27.               
  28.      VGA_register_set: any of CRTC, SEQ, ATRCTL, GRCTL, MISC.
  29.      register_index: an index in the specified VGA_register_set, 
  30.                      either in decimal (e.g. '24') or hex ('0x18') notation.
  31.                      Only needed when it is an indexed register (all except 'MISC').
  32.      data: the data to program into the specified register.
  33.  
  34.  
  35.  
  36. ./getVGAreg: version 0.6.4. (c) 1995 Koen Gadeyne (kmg@barco.be)
  37.  Usage: ./getVGAreg [options] VGA_register_set [register_index] 
  38.      
  39.      Options: -h  print usage information
  40.               -n  Don't program VGA hardware
  41.               -d  print debugging information
  42.               -u  unlock chipset-specific registers (needs /etc/TextConfig file)
  43.               -p  produce 'pipeable' decimal output (i.e. just the result, no text)
  44.               -x  produce 'pipeable' hex output (i.e. just the result, no text)
  45.               
  46.      VGA_register_set: any of CRTC, SEQ, ATRCTL, GRCTL, MISC.
  47.      register_index: an index in the specified VGA_register_set, 
  48.                      either in decimal (e.g. '24') or hex ('0x18') notation.
  49.                      Only needed when it is an indexed register (all except 'MISC').
  50.      
  51.  
  52.   
  53.  
  54. An example get/setVGAreg session could be:  ("> " denotes user input, the
  55. rest is output from the program)
  56.  
  57. > getVGAreg CRTC 0x09
  58. VGA 'CRTC' register, index 9 (=0x9) contains 107 (=0x6b)
  59.  
  60. > setVGAreg CRTC 0x09 0xeb
  61. VGA 'CRTC' register, index 9 (=0x9) contains 235 (=0xeb)
  62.  
  63.  
  64. Which will do something nice to your screen... ;-) (no harm done, don't be
  65. scared).
  66.  
  67.  
  68. The '-p' and '-h' options output just one number (the contents of the
  69. register). This is useful when used in a pipe, or in a script (this one was
  70. for an ET4000 special register, hence the '-u' flag for unlocking extended
  71. registers):
  72.  
  73.       #!/bin/bash              
  74.       ORIG31=`/sbin/getVGAreg -up CRTC 0x31`
  75.       echo Original CRTC reg 0x31 contents: $ORIG31
  76.       /sbin/setVGAreg -u CRTC 0x31 0x00
  77.       /usr/bin/X11/XF86_SVGA   
  78.       /sbin/setVGAreg -u CRTC 0x31 $ORIG31
  79.  
  80.  
  81. WARNING: since different SVGA cards use different extra address ranges in any 
  82. of the register sets, no checking is done to make sure you don't attempt to change
  83. a non-existing register!
  84.  
  85. This is just a hacking tool! Use at your own risk. It was NOT intended to be 
  86. idiot proof! If you don't understand all this, then don't bother trying to use it.
  87.  
  88.